<template>
	<view>
		<view v-for="(item,index) in list" class=" list">
			<view class="u-flex">
				<view>
					<u-icon name="map" size="35" color="#3464D6"></u-icon>
				</view>
				<view class="u-margin-left-20">
					<view class="" style="font-size: 32rpx;font-weight: bold;color: #333;">
					  {{item.storeName}}	
					</view>
					<view class="" style="color: #999999;">
					  {{item.storeAddress}}	
					</view>
				</view>
			</view>
			
			<view style="display: flex;justify-content: flex-end;margin-top: 20rpx;color: #fa3534;">卡内余额：￥{{item.balance}}</view>
			
		</view>
		
		<u-loadmore :status="status" />
	
		
		
	</view>
</template>

<script>
	export default{
		data(){
			return{
				 list:[],
				 page: 1,
				 status: 'loadmore',
				 
			}
		},
		onLoad() {
			this.jiazai()
		},
		
		onReachBottom() {
			if (this.status == 'nomore') {
		
			} else {
				this.jiazai()
			}
		
		},
		methods:{
			jiazai(){
				this.$u.post('/api/Financial/storeBalance', {
					
				}).then(res => {
					var resList = res;
					if (this.page == 1) {
						this.list = []
					}
					if (resList.length > 9) {
						this.status = 'loadmore'
						this.page = this.page + 1
					} else {
						this.status = 'nomore'
					}
					this.list = this.list.concat(resList)
					this.loading = false
				
					resolve(res)
				}).catch(err => {
				
				})
			}
			
		}
	}
</script>

<style>
	.list{
	  width: 690rpx;
	  margin: auto;
	  padding: 20rpx;
	box-shadow: 0px 4rpx 6rpx rgba(209, 209, 209, 0.25);
	 
	  margin-top: 20rpx;
	  border-radius: 20rpx;
	}
</style>
